<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test17</title>
</head>
<body>
    <script type="text/javascript">
        var num = 1;
        for (var i = 1 ; i <=5 ; i++){
            num = num *i;
        }
        console.log("5的阶乘为 " + num);
    </script>
</body>
</html>